About SendKey SendKey is a DLL which you can use to send keystrokes to another application from your own program written using Delphi. The package consists of: SNDKEY32.DLL - a DLL which you must distribute with your application; SNDKEY16.DLL - a 16-bit version of the DLL; SENDKEY.PAS - a unit containing constant and function definitions which you must include in the ‘uses’ clause of any unit which uses SendKey; SEND.DPR SMAIN.PAS SMAIN.DFM - a test project to demonstrate how SendKey works. To see SendKey in action, build and run the demo project SEND.DPR. If you want to build the 16-bit version you should first amend the declaration in the 'implementation' part of SENDKEY.PAS so that it refers to 'SNDKEY16' instead of 'SNDKEY32'. To use SendKey, you must first get the handle of the window you want to send keystrokes to (for example, using the API function FindWindow) and then call SendKeyString with two parameters: the window handle and the character string you want to send. Non-printing character keys are represented by ASCII codes 228 - 255; the constant definitions for these are given in the file SENDKEY.INT. SendKeyString returns a Boolean result which is false if the function fails. If SendKey does not work, make sure that the window handle you pass it is valid, and that it is the correct handle for the window you want to send the keystrokes to. If you are sending keystrokes to a dialog box then it is sometimes better to get the handle of the dialog box window. In Win32, API calls like GetActiveWindow can return a value of 0. Therefore it is better to use functions like FindWindow to be sure you have the correct handle. Registering SendKey SendKey is shareware. This is a trial run version, which means that it will only work when your program is run from the Delphi development environment. An unrestricted version, with full distribution rights for the DLL and a copy of the source code, will be sent on registration. Registration via CompuServe costs $15. GO SWREG, choose the option to Register Shareware, and use the registration ID 10326. You will receive the unrestricted DLL and source code by return email, usually within 2 to 3 working days. If you are not a member of CompuServe, the registration fee may be remitted by one of the following methods: i) a cheque for 12 pounds UK Sterling, drawn on a UK bank; ii) $15 in US banknotes, sent at your risk. Legal stuff This software is copyright © 1996 J M Technical Services. All rights reserved. You are granted a licence to use the software for evaluation purposes only, when used as part of an application developed using Borland Delphi 1 and run from the Delphi development environment. No warranty is given or implied as to the fitness of the software for any purpose. No responsibility whatsoever is accepted for any loss or damage, including consequential loss or damage, arising out of the use of the software. J M Technical Services 11a Cedar Lane Cockermouth Cumbria CA13 9HN Email contacts: support@jmtech.demon.co.uk 100015.1242@compuserve.com